{php include pubTemplate("header")}

<div class="container">

<div class="row">
  <div class="col-md-3"></div>
  <div class="col-md-6">





      <div class="card border-0">
          <div class="card-body" style="padding: 30px;">


            {if $strFuser}
            <div class="d-flex align-items-center">
                <div>
                    <img width="56" height="56" class="rounded-circle" src="{$strFuser['face']}">
                </div>

                <div class="ml-2">
                    <div>您好！我是 <span class=" font-weight-bold">{$strFuser['username']}</span>。</div>
                    <div>我正在邀请您加入 <span class=" font-weight-bold">{$TS_SITE['site_title']}</span> ，欢迎来和我一起交流！</div>
                </div>

            </div>

            <hr />

            {/if}



              <ul class="nav nav-tabs mb-4">
                  {if $TS_SITE['regtype']=='0' || $TS_SITE['regtype']=='2'}
                  <li class="nav-item">
                      <a class="nav-link font-weight-bold active" href="{tsUrl('user','register')}">Email注册</a>
                  </li>
                  {/if}
                  {if $TS_SITE['regtype']=='1' || $TS_SITE['regtype']=='2'}
                  <li class="nav-item">
                      <a class="nav-link font-weight-bold" href="{tsUrl('user','phone')}">手机号注册</a>
                  </li>
                  {/if}
              </ul>






              {if $TS_APP[isregister]=='2'}
              <p>系统升级中，暂时关闭用户注册！</p>
              <p><a href="{SITE_URL}">返回首页</a></p>
              {else}



              <form id="comm-form" method="POST" action="{SITE_URL}index.php?app=user&ac=register&ts=do">

                  {if $TS_SITE['isinvite']=='1'}
                  <div class="form-group">
                      <label>邀请码</label>
                      <input name="invitecode" type="text" class="form-control" placeholder="" check-type="required">
                  </div>
                  {/if}

                  <div class="form-group">
                      <label>Email</label>
                      <input name="email" type="email" class="form-control" placeholder="Email" onkeyup="this.value=this.value.replace(/[, ]/g,'')" check-type="required">
                  </div>

                  <div class="form-group">
                      <label>密码：</label>

                      <input name="pwd" type="password" class="form-control" placeholder="" check-type="required">

                  </div>

                  <div class="form-group">
                      <label>重复密码：</label>
                      <input name="repwd" type="password" class="form-control" placeholder="" check-type="required">
                  </div>

                  <div class="form-group">
                      <label>用户名：</label>
                      <input name="username" type="text" class="form-control" placeholder="" check-type="required">
                  </div>


                  <!--人机验证-->
                    {if $TS_SITE['is_vaptcha']}
                    <div class="form-group">
                        <label>人机验证：</label>

                        <div class="offset-0">
                            
                            <div id="vaptchaContainer" style="width: 300px;height: 36px;">
                                <div class="vaptcha-init-main">
                                <div class="vaptcha-init-loading">
                                    <a href="/" target="_blank">
                                    <img src="https://r.vaptcha.net/public/img/vaptcha-loading.gif" />
                                    </a>
                                    <span class="vaptcha-text">Vaptcha启动中...</span>
                                </div>
                                </div>
                            </div>
                            <script src="https://v.vaptcha.com/v3.js"></script>
                            <script>
                                vaptcha({
                                    vid: '{$TS_SITE[vaptcha_vid]}',
                                    type: 'click',
                                    container: '#vaptchaContainer',
                                    offline_server: "{SITE_URL}index.php?app=pubs&ac=vaptcha",
                                }).then(function (vaptchaObj) {
                                    vaptchaObj.render()
                                    vaptchaObj.renderTokenInput('#vaptcha-token')
                                })
                            </script>

                        </div>

                        <div id="vaptcha-token"></div>

                    </div>
                    {/if}


                  {if $TS_SITE['isauthcode']}
                  <div class="form-group">
                      <label>验证码：</label>



                      <div class="d-flex flex-row align-items-start">
                          <div class="d-flex flex-column">
                              <input name="authcode" type="text" class="form-control" placeholder="" check-type="required">
                          </div>
                          <div class="d-flex ml-1">

                              <img id="imagecode" align="absmiddle" src="{SITE_URL}index.php?app=pubs&ac=code" onclick="javascript:newgdcode(this,this.src);" title="点击刷新验证码" alt="点击刷新验证码" style="cursor:pointer;" />
                              <a href="javascript:void('0');" onclick="changeImageCode();">点击刷新验证码</a>

                          </div>
                      </div>








                  </div>
                  {/if}




                  <div class="form-group">

                      <input type="hidden" name="fuserid" value="{$fuserid}" />
                      <input type="hidden" name="token" value="{$_SESSION['token']}" />
                      <button id="comm-submit" type="submit" class="btn btn-fat btn-success btn-lg btn-block">注册</button>

                  </div>


              </form>

              <div class="lh30">
                  {php doAction('user_login_footer')}
              </div>

              {/if}



          </div>
      </div>








</div>

  <div class="col-md-3"></div>
</div>


</div>
{php include pubTemplate("footer")}